1. Field of the Invention
The present invention relates to a mobile terminal, and more particularly to a mobile terminal such as a portable terminal with a bus manager switching function.
2. Description of the Related Art
A camera having USB (universal serial bus) is known. An image is picked up by such a camera and is transmitted to a destination node using a portable phone. In this case, USB is added to the portable phone, and a USB bus manager is built in USB to accomplish a bus control function.
In such a conventional example, a portable phone is connected with a personal computer. The image data is received through a radio channel and is printed using a high resolution printer which is already connected with the personal computer by use of USB. Alternatively, an application is assumed to update the firmware of the portable phone through data communication with the PC. In this case, the portable phone desirably has a function as a USB bus slave to operate in response to an instruction from the personal computer.
There is a case that the host personal computer is in its operating state and a plurality of devices containing the portable phone operate as bus peripheral devices of the host personal computer on a USB bus tree. On the other hand, there is a case that there is not the host personal computer, so that the portable phone needs to operate as a bus manager. However, there is no means adaptable for various operation conditions. Therefore, it is desirable for the portable phone to have both of a function as the USB bus manager and a function as the USB bus slave.
In conjunction with the above description, an electronic equipment and an interface circuit are disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 10-301898). In this reference, the electronic equipment has an interface circuit to connect another equipment. The interface circuit is composed of a plurality of connectors (30 and 32) for which the terminals to connect data lines are provided, bidirectional line drivers (36 and 38) which send and receive signals through the data lines corresponding to the plurality of connectors (30 and 32), a rout section 34, transistors (44, 46, 48, 50, 52 and 54) to switch a plurality of routes provided in the route section 34, and a USB control unit 42 which controls the route switching operation. The route section 34 is composed of routes between the plurality of connectors (30 and 32) and the line drivers (36 and 38), respectively, and routes between the terminals of the plurality of connectors (30 and 32).
Also, an electronic equipment and an interface circuit are disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 10-301899). The electronic equipment has an interface circuit to connect another equipment. The interface circuit is composed of a USB connector (30) having the terminals to connect data lines (D+ and Dxe2x88x92) and power supply lines (Vcc and GND), a power supply section (32) to supply power through power supply lines, a switching section 34 to selectively connect pull-up resistor (R2:44 and 48), and pull-down register (R1:46 and 49) to the data lines (D+ and Dxe2x88x92) and to switch connection between the power supply section (32) and the power supply line (Vcc), and a USB control unit (38) for the above connection and switching.
Therefore, an object of the present invention is to provide a portable phone with a function as a USB bus manager and a function as a USB bus slave.
In order to achieve an aspect of the present invention, a portable terminal, includes a host detector, a hub circuit and a bus manager circuit. The host detector detects whether a host operates as a bus manager. The hub circuit has a hub function and is connectable to an external device. The bus manager circuit has a bus manager function. The bus manager circuit stops the bus manager function such that the host can operate as the bus manager for the portable terminal and the external device connected to the portable terminal, when the host operates as the bus manager. Also, the bus manger circuit carries out the bus manager function such that the bus manager circuit can operate as the bus manager for the portable terminal and the external device connected to the portable terminal, when the host does not operate as the bus manager.
The host detector outputs a bus manager indication signal in response to reception of a signal from the host. At this time, the bus manager circuit determines that the host operates as the bus manager, in response to the bus manager indication signal.
Also, the portable terminal may further includes a host connection detector detecting whether the host is connected. At this time, the bus manager circuit carries out the bus manager function, when the host is not connected. More specifically, the host connection detector detects whether a power source voltage is supplied, and determines that the host is connected when the power supply voltage is supplied. Also, in this case, the portable terminal may further includes an internal power source supplying a power source voltage, and a switching circuit. The switching circuit outputs one of the power source voltage from the host and the power source voltage from the internal power source to the external device in response to a power control signal, when the external device. The bus manager circuit generates the power control signal when the host is connected.
In order to achieve another aspect of the present invention, a bus manager control method, is accomplished by (a) determining whether a host is connected to a portable terminal, the host having a bus manager function, and the portable terminal having a bus manager function and a hub function and being connectable with an external device; by (b) determining whether the host is in a suspended state, when it is determined that the host is connected to the portable terminal; by (c) stopping the bus manager function of the portable terminal such that the host can operate a bus manager for the portable terminal and the external device connected to the portable terminal, when the host is connected to the portable terminal and is not in the suspended state; and by (d) carrying out the bus manager function of the portable terminal such that the portable terminal can operate as the bus manager for the portable terminal and the external device connected to the portable terminal, when the host is not connected to the portable terminal or when the host is in the suspended state.
For the purpose of the (a) determining, a power source voltage from the host is detected, and then it is determined that the host is connected to the portable terminal, when the power source voltage is detected. Also, the power source voltage is connected to the external device, when the power source voltage is detected.
Also, for the (b) determining, a signal transferred from the host is detected, and then it is determined that the host operates as the bus manager, when the signal is transferred from the host.